import 'package:flutter/material.dart';

class Chapter6Page extends StatelessWidget {
  const Chapter6Page({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("第六章"),
        leading: IconButton(
          icon: const Icon(Icons.home),
          onPressed: () => Navigator.of(context).pushNamed("/"),
        ),
      ),
      body: SingleChildScrollView(
        child: Center(
          child: Column(
            children: <Widget>[
              const SizedBox(height: 20),
              ElevatedButton(
                onPressed: () => Navigator.of(context)
                    .pushNamed("/chapter6/single/child/scroll/view"),
                child: const Text("SingleChildScrollView"),
              ),
              const SizedBox(height: 20),
              ElevatedButton(
                onPressed: () =>
                    Navigator.of(context).pushNamed("/chapter6/list/view1"),
                child: const Text("ListView1"),
              ),
              const SizedBox(height: 20),
              ElevatedButton(
                onPressed: () =>
                    Navigator.of(context).pushNamed("/chapter6/list/view2"),
                child: const Text("ListView2"),
              ),
              const SizedBox(height: 20),
              ElevatedButton(
                onPressed: () => Navigator.of(context)
                    .pushNamed("/chapter6/infinite/list/view"),
                child: const Text("ListView 无限加载"),
              ),
              const SizedBox(height: 20),
              ElevatedButton(
                onPressed: () => Navigator.of(context)
                    .pushNamed("/chapter6/scroll/controller"),
                child: const Text("滚动监听及控制"),
              ),
              const SizedBox(height: 20),
              ElevatedButton(
                onPressed: () => Navigator.of(context)
                    .pushNamed("/chapter6/scroll/notification"),
                child: const Text("监听滚动通知"),
              ),
              const SizedBox(height: 20),
              ElevatedButton(
                onPressed: () =>
                    Navigator.of(context).pushNamed("/chapter6/animated/list"),
                child: const Text("Animated List"),
              ),
              const SizedBox(height: 20),
              ElevatedButton(
                onPressed: () =>
                    Navigator.of(context).pushNamed("/chapter6/grid/view"),
                child: const Text("GridView 1"),
              ),
              const SizedBox(height: 20),
              ElevatedButton(
                onPressed: () =>
                    Navigator.of(context).pushNamed("/chapter6/grid/view/2"),
                child: const Text("GridView 2"),
              ),
              const SizedBox(height: 20),
              ElevatedButton(
                onPressed: () =>
                    Navigator.of(context).pushNamed("/chapter6/grid/view/3"),
                child: const Text("GridView 3"),
              ),
              const SizedBox(height: 20),
              ElevatedButton(
                onPressed: () =>
                    Navigator.of(context).pushNamed("/chapter6/grid/view/4"),
                child: const Text("GridView 4"),
              ),
              const SizedBox(height: 20),
              ElevatedButton(
                onPressed: () => Navigator.of(context)
                    .pushNamed("/chapter6/infinite/grid/view"),
                child: const Text("Infinite GridView"),
              ),
              const SizedBox(height: 20),
              ElevatedButton(
                onPressed: () =>
                    Navigator.of(context).pushNamed("/chapter6/page/view"),
                child: const Text("Page View"),
              ),
              const SizedBox(height: 20),
              ElevatedButton(
                onPressed: () =>
                    Navigator.of(context).pushNamed("/chapter6/keep/alive"),
                child: const Text("Keep Alive Wrapper"),
              ),
              const SizedBox(height: 20),
              ElevatedButton(
                onPressed: () =>
                    Navigator.of(context).pushNamed("/chapter6/tab/bar/view"),
                child: const Text("TabBarView"),
              ),
              const SizedBox(height: 20),
              ElevatedButton(
                onPressed: () => Navigator.of(context)
                    .pushNamed("/chapter6/custom/scroll/view"),
                child: const Text("CustomScrollView"),
              ),
              const SizedBox(height: 20),
              ElevatedButton(
                onPressed: () => Navigator.of(context)
                    .pushNamed("/chapter6/custom/scroll/view2"),
                child: const Text("CustomScrollView2"),
              ),
              const SizedBox(height: 20),
              ElevatedButton(
                onPressed: () => Navigator.of(context)
                    .pushNamed("/chapter6/nested/scroll/view1"),
                child: const Text("NestedScrollView"),
              ),
              const SizedBox(height: 20),
              ElevatedButton(
                onPressed: () => Navigator.of(context)
                    .pushNamed("/chapter6/nested/scroll/view2"),
                child: const Text("NestedScrollView 2"),
              ),
              const SizedBox(height: 20),
            ],
          ),
        ),
      ),
    );
  }
}
